package com.example.statistics.bean;

import androidx.annotation.Nullable;

import com.jhj.slimadapter.model.BaseTreeModel;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class CityTreeBean extends BaseTreeModel<CityTreeBean> implements Serializable {

    private int id;
    private String name;
    private String remark;
    private ArrayList<CityTreeBean> children;
    private int levels;

    public CityTreeBean() {
    }

    public CityTreeBean(int id, String name, int levels, boolean root) {
        this.id = id;
        this.name = name;
        this.levels = levels;
        this.root = root;
    }

    public CityTreeBean(String name, int levels, boolean root) {
        this.name = name;
        this.levels = levels;
        this.root = root;
    }

    public CityTreeBean(String name, int levels, boolean root, ArrayList<CityTreeBean> children) {
        this.name = name;
        this.levels = levels;
        this.root = root;
        this.children = children;
    }

    public void setChildren(ArrayList<CityTreeBean> children) {
        this.children = children;
    }

    private boolean root;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public int getLevels() {
        return levels;
    }

    public void setLevels(int levels) {
        this.levels = levels;
    }

    @Override
    public boolean isRoot() {
        return root;
    }

    @Override
    public void setRoot(boolean b) {
        this.root = b;
    }

    @Nullable
    @Override
    public List<CityTreeBean> getChildren() {
        return children;
    }
}
